package com.ruoyi.system.domain;

import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.entity.SysUser;

/**
 * 【请填写功能名称】对象 chats
 * 
 * @author ruoyi
 * @date 2024-12-06
 */
public class Chats {
    // private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long chatId;

    /** $column.columnComment */
    @Excel(name = "学生Id")
    private Long user1Id;

    /** $column.columnComment */
    @Excel(name = "教师Id")
    private Long user2Id;

    /** $column.columnComment */
    @Excel(name = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdAt;
 
    @Excel(name = "消息")
    private List<Messages> messages;
    @Excel(name = "消息")
    private SysUser user;
    
    public void setChatId(Long chatId) {
        this.chatId = chatId;
    }

    public Long getChatId() {
        return chatId;
    }
    public void setMessages(List<Messages> messages) {
        this.messages = messages;
    }

    public List<Messages> getMessages() {
        return messages;
    }

    public void setUser(SysUser user) {
        this.user = user;
    }

    public SysUser getUser() {
        return user;
    }

    public void setUser1Id(Long user1Id) {
        this.user1Id = user1Id;
    }

    public Long getUser1Id() {
        return user1Id;
    }

    public void setUser2Id(Long user2Id) {
        this.user2Id = user2Id;
    }

    public Long getUser2Id() {
        return user2Id;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("chatId", getChatId())
                .append("user1Id", getUser1Id())
                .append("user2Id", getUser2Id())
                .append("createdAt", getCreatedAt())
                .toString();
    }
}
